Software Development
Fundamentals of Object-oriented Programming in C++
Final Exam: Object-oriented Concepts in C++
OOP in C++: Copy Constructors, Nested Classes, & Namespaces
OOP in C++: Getting Started with Object-oriented Programming
OOP in C++: Instantiating Objects Using Constructors
OOP in C++: Using Static Members & Destructors
OOP in C++: Using the this Pointer & const Members

Final Exam: Object-oriented Concepts in C++

Course Number:
it_fepccp_03_enus
Lesson Objectives

Final Exam: Object-oriented Concepts in C++

  • outline encapsulation and the use of classes and objects
  • create a class and use the public access modifier
  • create variables and define getters and setters
  • use private and public constructors and functions
  • add default arguments to constructors
  • create structs and contrast them with classes
  • use the this pointer
  • chain method calls by returning the this pointer
  • create const objects and const member functions
  • access static variables using the scope resolution operator
  • define and invoke static functions
  • define and use object destructors
  • create copies of objects using C++'s default copy constructor
  • implement a custom copy constructor
  • access private variables using friend functions and classes
  • store functions and classes in namespaces
  • contrast is-a relationships and inheritance with has-a relationships and composition
  • compare public and private members of base classes
  • use the protected access modifier for derived and external classes
  • use ‘protected’ as the base class access specifier
  • invoke base class constructors from derived classes
  • create pointers to derived and base class objects
  • create references to derived and base class objects
  • demonstrate ways of getting around name hiding
  • contrast compile time and runtime polymorphism
  • enable runtime polymorphism using the ‘virtual’ keyword
  • recall that the signatures of dynamically dispatched methods must be the same
  • disable overriding and inheritance using the ‘final’ keyword
  • enable runtime polymorphism by marking destructors as virtual
  • use the scope resolution operator to invoke specific versions of virtual methods
  • outline the concept of abstract classes
  • outline the concepts of multiple inheritance and the diamond hierarchy
  • perform multiple inheritance and explore naming collisions
  • perform dynamic casts
  • outline key concepts of operator overloading
  • overload the < operator
  • inline operator overloads and to use as member functions
  • overload operators with primitive types as the right operand
  • use std::rel_ops and implement comparison operators
  • use the overloaded + operator
  • perform operator overloading of the += operator
  • overload the pre and post increment operators
  • overload the insertion and extraction operators
  • instantiate objects and use the default copy assignment operator
  • differentiate when the copy constructor should be used and when the copy assignment operator should be used
  • use the copy-swap idiom to write exception safe code
  • illustrate the use of function and class templates
  • recall the need for function templates
  • name templates to explicitly specify their type
  • invoke functions with specialized templates
  • create function templates with multiple values
  • use decl_type and contrast it with auto
  • create and instantiate classes with class template parameters
  • use non-type template parameters with classes
  • illustrate the features of non-type parameters
  • create specializations of class templates
  • check template type parameters using static_assert
  • create l-value and r-value references using the & and && operators
  • define a move assignment operator
  • implement move constructors and move assignment operators

Overview/Description

Final Exam: Object-oriented Concepts in C++ will test your knowledge and application of the topics presented throughout the Object-oriented Concepts in C++ track of the Skillsoft Aspire Programming in C++ Journey.



Target

Prerequisites: none

OOP in C++: Copy Constructors, Nested Classes, & Namespaces

Course Number:
it_cpopcpdj_05_enus
Lesson Objectives

OOP in C++: Copy Constructors, Nested Classes, & Namespaces

  • discover the key concepts covered in this course
  • create copies of objects using C++'s default copy constructor
  • implement a custom copy constructor
  • use pass-by-value and pass-by-reference semantics with objects
  • create a copy of an object containing pointers
  • identify the errors that can result from using the default copy constructor
  • implement copy constructors for a class containing pointers
  • access private variables using friend functions and classes
  • create private and public nested classes
  • identify and use the global namespace
  • store functions and classes in namespaces
  • create and reference namespaces
  • summarize the key concepts covered in this course

Overview/Description
A copy constructor in C++ classes is a specialized method used to create an object from another object of the same class. Other specialized C++ methods include nested classes and namespaces, which organize different classes in a logical and coherent manner while avoiding name conflicts. In this course, learn how to specify and use a copy constructor. Next, discover how classes and functions can be marked as friends. Finally, examine how nested classes can be defined and used in C++ and practice using namespaces to modularize your code. After completion of the course, you’ll be able to create and implement a custom copy constructor, access private variables using friend functions and classes, and store functions and classes in namespaces.

Target

Prerequisites: none

OOP in C++: Getting Started with Object-oriented Programming

Course Number:
it_cpopcpdj_01_enus
Lesson Objectives

OOP in C++: Getting Started with Object-oriented Programming

  • discover the key concepts covered in this course
  • recognize C++ as an object-oriented language
  • recall the structure of classes and objects
  • outline encapsulation and the use of classes and objects
  • create a class and use the public access modifier
  • create variables and define getters and setters
  • define and overload constructors to initialize member variables
  • use private and public constructors and functions
  • create a header file and a corresponding C++ file
  • work through common errors that arise when using header files
  • discern various errors related to header files
  • summarize the key concepts covered in this course

Overview/Description
C++ is an object-oriented programming (OOP) language wherein developers model real-world entities, create classes, and instantiate objects of classes. In this course, learn how the object-oriented programming approach functions at a conceptual level. Discover how class act effectively as blueprints and explore member variables. Then, examine class definitions in your C++ programs and practice instantiating objects of those classes. Next, learn how to perform simple operations on those objects, invoke methods on them, and access and examine their member variables. Finally, learn how to modularize your code and declare a class in the header file. After completion of the course, you’ll be able to define classes, instantiate objects, and split class implementation and declaration.

Target

Prerequisites: none

OOP in C++: Instantiating Objects Using Constructors

Course Number:
it_cpopcpdj_02_enus
Lesson Objectives

OOP in C++: Instantiating Objects Using Constructors

  • discover the key concepts covered in this course
  • add default arguments to constructors
  • initialize variables using initialization lists
  • explore finer points of initialization lists
  • connect constructors using constructor chaining
  • prevent implicit type conversions using the explicit keyword
  • create structs and contrast them with classes
  • summarize the key concepts covered in this course

Overview/Description
A constructor is a special method of a class invoked when an object of that class is created. Constructors have a fair bit of complexity, and can be chained to achieve code reuse and marked as explicit to avoid unexpected type promotions and object creation. In this course, examine the important aspects of constructor syntax, such as specifying default arguments and correctly using initialization lists. Next, learn how to chain constructors and retain most of the code functionality in one constructor. Finally, learn how constructors might be invoked automatically by the C++ runtime to create objects for method invocations. After completion of the course, you’ll be able to correctly initialize variables using initialization lists, connect constructors using constructor chaining, and create structs.

Target

Prerequisites: none

OOP in C++: Using Static Members & Destructors

Course Number:
it_cpopcpdj_04_enus
Lesson Objectives

OOP in C++: Using Static Members & Destructors

  • discover the key concepts covered in this course
  • create static variables using the pre-C++17 format
  • differentiate between the old and new C++ syntax for creating static variables
  • access static variables using the scope resolution operator
  • define and invoke static functions
  • define and use object destructors
  • implement constructors and destructors with free store memory
  • instantiate and deallocate a pointer in constructors and destructors
  • summarize the key concepts covered in this course

Overview/Description
Static means something different in C++ compared to C. In C, static refers to a storage class for storing specific types of variables. In C++, static refers to member functions and variables associated with the entire class. In this course, learn how to mark a member variable within a class as static, initialize a static member variable, and access it from methods within and outside the class. Next, discover how static member functions can be used for class-level behavior. Finally, learn how to define and use a destructor. After completion of the course, you’ll be able to create and use static variables, access them using the scope resolution operator, and instantiate and deallocate a pointer in constructors and destructors.

Target

Prerequisites: none

OOP in C++: Using the this Pointer & const Members

Course Number:
it_cpopcpdj_03_enus
Lesson Objectives

OOP in C++: Using the this Pointer & const Members

  • discover the key concepts covered in this course
  • use the this pointer
  • chain method calls by returning the this pointer
  • create const objects and const member functions
  • identify common errors related to const objects and functions
  • use const pointers and const references
  • create const and non-const objects and functions
  • modify returned values of functions to modify the state
  • create setters, disable const using const_cast, and use mutable keywords
  • summarize the key concepts covered in this course

Overview/Description
When a member function is invoked on a particular object, that object is known as the receiver. Within the body of the member function, you can access the member variables of the receiver using the "this" pointer. In this course, discover how the this pointer works and practice using it to access states. Next, learn about constness in object-oriented programming and the restrictions for what such methods can do. Finally, learn how to use the mutable keyword to mitigate constness. After completion of the course, you’ll be able to access member variables from within member functions, create const and non-const objects and functions, and use the mutable specification to identify states that can be changed without changing the meaning of the object.

Target

Prerequisites: none

Close Chat Live